<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<script src="js/vue.js" type="text/javascript" charset="utf-8"></script>
	</head>
	<body>
		<div id="app">
			<input type="text" v-model="obj.nickname" />
			<input type="text" v-model="name" />
			<input type="checkbox" v-model="names" id='jack' value="jack" />
			<label for="jack">jack</label>
			<input type="checkbox" v-model="names" id='july' value="july" />
			<label for="july">july</label>
			<input type="radio" value='1' id='apple' v-model="fuits.val" />
			<label for="apple">apple</label>
			<input type="radio" value='2' id='lingo' v-model="fuits.val" />
			<label for="lingo">lingo</label>
			<input type="radio" value='3' id='banana' v-model="fuits.val" />
			<label for="banana">banana</label>
			<textarea v-model="text"></textarea>
			<span>{{name}}</span>
			<span>{{obj.nickname}}</span>
			<span>checked :{{names}}</span>
			<span>radio :{{fuits}}</span>
			<button type="button" @click="submit">提交</button>
		</div>
		
		
	</body>
	<script type="text/javascript">
		var vm=new Vue({
			el:'#app',
			data:{
				obj:{nickname:'huahua'},
				name:'csyaonie',
				names:['jack'],
				fuits:{val:2},
				text:'this is a textarea'
			},
			methods:{
				
				submit:function(){
					this.fuits.val='3';
					console.log(this.name);
				},
			}
		});
	</script>
</html>
